package com.supermap.business.product;

import com.alibaba.dubbo.config.annotation.Reference;
import com.supermap.dataservice.util.JSONUtil;
import com.supermap.dubbo.api.product.GetExpertUserListService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author aqua
 * @description 专家列表
 * @date 2018年11月04 20:33
 * @email 1301584033@qq.com
 */
@Controller
@CrossOrigin
@RequestMapping("/expertList")
public class ExpertUserListController {

    @Reference(timeout = 5000)
    private GetExpertUserListService getExpertUserListService;


    @GetMapping("/getExepertBysSubjectIdandAreaCode")
    @ResponseBody
    public JSONUtil getExepertBysSubjectIdandAreaCode(Integer
                                                              subjectId,Integer areaCode,Integer pageSize,Integer pageNum){

        return  getExpertUserListService.getExepertBysSubjectIdandAreaCode
                (subjectId,areaCode,pageSize,pageNum);

    }

    @GetMapping("/getExpertdetailsByexperId")
    @ResponseBody
    public JSONUtil getExepertBysSubjectIdandAreaCode(String experId){
        return  getExpertUserListService.getExpertdetailsByexperId(experId);

    }

    @GetMapping("/getListSubjectDownExpert")
    @ResponseBody
    public JSONUtil getListSubjectDownExpert(Integer areaCode,Integer pageSize,Integer pageNum,Integer expertNum){
        return  getExpertUserListService.getListSubjectDownExpert(areaCode,pageSize,pageNum,expertNum);

    }

}
